< previous page page_119 next page >

Page 119
0119-01.jpg
Figure 4.4
Example program FMetrics uses the GetTextMetrics API
function to obtain detailed information about a font's geometry.
CreateFont Function
Using a drawing object's Font property, you can make the object display text using one of the standard fonts available on your system. You can also use the CreateFont API function to build customized versions of many fonts. These fonts can be unusually tall and thin, unusually short and wide, or rotated at an angle.
With 14 arguments, CreateFont is one of the more complicated API functions. Its Visual Basic declaration is:
e10a6a0a59f035e870d90cca05b85fce.gif
Private Declare Function CreateFont Lib "gdi32" _
    Alias "CreateFontA" ( _
    ByVal Height As Long, _
    ByVal Width As Long, _
0119-02.jpg
Figure 4.5
Example program Styles2 uses the GetTextMetrics API
function to align the baselines of text in different fonts.

 
< previous page page_119 next page >